// 导入mongoose(已封装)
const mongoose = require('./connect')

// 分类表的schema
const catSchema = new mongoose.Schema({
    catname: {
        required: true,
        type: String
    }
})

const catModel = mongoose.model('cat', catSchema, 'cat')

// 导出model
module.exports = catModel